import { result, qsparse } from '../util'
import Mock from 'mockjs'
const getUserInfo = () => result(() => {
  const obj = Mock.mock({
    'userInfo|1': [{
      'employeeId': '10001',
      'employeeName': '测试员工',
      'mobilephone': '13812998881',
      'email': '999999@qq.com',
      'gender': 1,
      'loginAccount': 'admin',
      'wxUserId': 'Xint121',
      'departmentCode': '1000',
      'departmentName': '全公司',
      'postName': '销售经理',
      'postCode': 'P0001',
      'superiorName': '@cname',
      'avatar': "@image('150x150', '#409eff','#FFF', 'png','平')"
    }]
  })
  return obj.userInfo
})
const updateImg = () => result(() => {
  return null
})
export default {
  'post|user/updateImg': (options) => {
    const data = qsparse(options)
    console.log('updateImg', data)
    return updateImg
  },
  'post|user/getUserInfo': getUserInfo
}
